<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: nc::linalg Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">2.4.0</span>
   </div>
   <div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('namespacenc_1_1linalg.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">nc::linalg Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnc_1_1linalg_1_1_s_v_d.html">SVD</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac2d27e58dd0f082ef5a422d545699d19"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:ac2d27e58dd0f082ef5a422d545699d19"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#ac2d27e58dd0f082ef5a422d545699d19">cholesky</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inMatrix)</td></tr>
<tr class="separator:ac2d27e58dd0f082ef5a422d545699d19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55bafcebbc897458164e8dc511b6119c"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a55bafcebbc897458164e8dc511b6119c"><td class="memTemplItemLeft" align="right" valign="top">dtype&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#a55bafcebbc897458164e8dc511b6119c">det</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inArray)</td></tr>
<tr class="separator:a55bafcebbc897458164e8dc511b6119c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff0f97e94666284100b584e13d27def3"><td class="memTemplParams" colspan="2">template&lt;typename dtype , typename ... Params, nc::enable_if_t&lt; is_arithmetic_v&lt; dtype &gt;, int &gt;  = 0, nc::enable_if_t&lt; all_arithmetic_v&lt; Params... &gt;, int &gt;  = 0, nc::enable_if_t&lt; all_same_v&lt; dtype, Params... &gt;, int &gt;  = 0&gt; </td></tr>
<tr class="memitem:aff0f97e94666284100b584e13d27def3"><td class="memTemplItemLeft" align="right" valign="top">std::pair&lt; <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;, double &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#aff0f97e94666284100b584e13d27def3">gaussNewtonNlls</a> (const <a class="el" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> numIterations, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;coordinates, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;measurements, const std::function&lt; dtype(const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;)&gt; &amp;function, const std::array&lt; std::function&lt; dtype(const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;)&gt;, sizeof...(Params)&gt; &amp;derivatives, Params... initialGuess)</td></tr>
<tr class="separator:aff0f97e94666284100b584e13d27def3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7ced3680f1ae95af4bc2e6b98a5a517"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:ae7ced3680f1ae95af4bc2e6b98a5a517"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#ae7ced3680f1ae95af4bc2e6b98a5a517">hat</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inVec)</td></tr>
<tr class="separator:ae7ced3680f1ae95af4bc2e6b98a5a517"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9cdb091717a1c74dc659519d77e0048"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#ae9cdb091717a1c74dc659519d77e0048">hat</a> (const <a class="el" href="classnc_1_1_vec3.html">Vec3</a> &amp;inVec)</td></tr>
<tr class="separator:ae9cdb091717a1c74dc659519d77e0048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12e16cb9d1a7b09e85b4abbef14ba2ef"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a12e16cb9d1a7b09e85b4abbef14ba2ef"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#a12e16cb9d1a7b09e85b4abbef14ba2ef">hat</a> (dtype inX, dtype inY, dtype inZ)</td></tr>
<tr class="separator:a12e16cb9d1a7b09e85b4abbef14ba2ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae36553eb100d8f2c2167e8ecadf2a9fc"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:ae36553eb100d8f2c2167e8ecadf2a9fc"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#ae36553eb100d8f2c2167e8ecadf2a9fc">inv</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inArray)</td></tr>
<tr class="separator:ae36553eb100d8f2c2167e8ecadf2a9fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c15421c77e6b4b12fca1515596d1414"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a9c15421c77e6b4b12fca1515596d1414"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#a9c15421c77e6b4b12fca1515596d1414">lstsq</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inA, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inB, double inTolerance=1e-12)</td></tr>
<tr class="separator:a9c15421c77e6b4b12fca1515596d1414"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a153a90dbcc2ca94c664c429868d15bc4"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a153a90dbcc2ca94c664c429868d15bc4"><td class="memTemplItemLeft" align="right" valign="top">std::pair&lt; <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#a153a90dbcc2ca94c664c429868d15bc4">lu_decomposition</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inMatrix)</td></tr>
<tr class="separator:a153a90dbcc2ca94c664c429868d15bc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad27c1996e4e27a6f8ba5d2aed0743bba"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:ad27c1996e4e27a6f8ba5d2aed0743bba"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#ad27c1996e4e27a6f8ba5d2aed0743bba">matrix_power</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inArray, <a class="el" href="namespacenc.html#a8f5045ed0f0a08d87fd76d7a74ac128d">int16</a> inPower)</td></tr>
<tr class="separator:ad27c1996e4e27a6f8ba5d2aed0743bba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86ab79e41b748e7ea0ee4f2e0bc462a6"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a86ab79e41b748e7ea0ee4f2e0bc462a6"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#a86ab79e41b748e7ea0ee4f2e0bc462a6">multi_dot</a> (const std::initializer_list&lt; <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &gt; &amp;inList)</td></tr>
<tr class="separator:a86ab79e41b748e7ea0ee4f2e0bc462a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a390c3d32ed4b8ed7e718cbe121025ebd"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a390c3d32ed4b8ed7e718cbe121025ebd"><td class="memTemplItemLeft" align="right" valign="top">std::tuple&lt; <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt;, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#a390c3d32ed4b8ed7e718cbe121025ebd">pivotLU_decomposition</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inMatrix)</td></tr>
<tr class="separator:a390c3d32ed4b8ed7e718cbe121025ebd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb38ad2613d50422afc539d005159055"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:acb38ad2613d50422afc539d005159055"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1linalg.html#acb38ad2613d50422afc539d005159055">svd</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inArray, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &amp;outU, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &amp;outS, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &amp;outVt)</td></tr>
<tr class="separator:acb38ad2613d50422afc539d005159055"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ac2d27e58dd0f082ef5a422d545699d19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2d27e58dd0f082ef5a422d545699d19">&#9670;&nbsp;</a></span>cholesky()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt; nc::linalg::cholesky </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inMatrix</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>matrix cholesky decomposition A = L * <a class="el" href="namespacenc.html#aa6c78ac10e4c3aa446716f80aa1a72ca">L.transpose()</a></p>
<p>NumPy Reference: <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.cholesky.html#numpy.linalg.cholesky">https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.cholesky.html#numpy.linalg.cholesky</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inMatrix</td><td><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> to be decomposed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> of the decomposed L matrix </dd></dl>

</div>
</div>
<a id="a55bafcebbc897458164e8dc511b6119c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55bafcebbc897458164e8dc511b6119c">&#9670;&nbsp;</a></span>det()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">dtype nc::linalg::det </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inArray</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>matrix determinant. NOTE: can get verrrrry slow for large matrices (order &gt; 10)</p>
<p>SciPy Reference: <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.det.html#scipy.linalg.det">https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.det.html#scipy.linalg.det</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inArray</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>matrix determinant </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_read_me_8cpp-example.html#a64">ReadMe.cpp</a>.</dd>
</dl>

</div>
</div>
<a id="aff0f97e94666284100b584e13d27def3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff0f97e94666284100b584e13d27def3">&#9670;&nbsp;</a></span>gaussNewtonNlls()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype , typename ... Params, nc::enable_if_t&lt; is_arithmetic_v&lt; dtype &gt;, int &gt;  = 0, nc::enable_if_t&lt; all_arithmetic_v&lt; Params... &gt;, int &gt;  = 0, nc::enable_if_t&lt; all_same_v&lt; dtype, Params... &gt;, int &gt;  = 0&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::pair&lt;<a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt;, double&gt; nc::linalg::gaussNewtonNlls </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a>&#160;</td>
          <td class="paramname"><em>numIterations</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>coordinates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>measurements</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::function&lt; dtype(const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;)&gt; &amp;&#160;</td>
          <td class="paramname"><em>function</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::array&lt; std::function&lt; dtype(const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;)&gt;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sizeof...&#160;</td>
          <td class="paramname">Params, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&amp;&#160;</td>
          <td class="paramname"><em>derivatives</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Params...&#160;</td>
          <td class="paramname"><em>initialGuess</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The Gauss�Newton algorithm is used to solve non-linear least squares problems. It is a modification of Newton's method for finding a minimum of a function. <a href="https://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm">https://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">numIterations</td><td>the number of iterations to perform </td></tr>
    <tr><td class="paramname">coordinates</td><td>the coordinate values. The shape needs to be [n x d], where d is the number of diminsions of the fit function (f(x) is one dimensional, f(x, y) is two dimensions, etc), and n is the number of observations that are being fit to. </td></tr>
    <tr><td class="paramname">measurements</td><td>the measured values that are being fit </td></tr>
    <tr><td class="paramname">function</td><td>a std::function of the function that is being fit. The function takes as inputs an <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> of a single set of the coordinate values, and an <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> of the current values of the fit parameters </td></tr>
    <tr><td class="paramname">derivatives</td><td>array of std::functions to calculate the function derivatives. The function that is being fit. The function takes as inputs an <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> of a single set of the coordinate values, and an <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> of the current values of the fit parameters </td></tr>
    <tr><td class="paramname">initialGuess</td><td>the initial guess of the parameters to be solved for</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::pair of <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> of solved parameter values, and rms of the residuals value </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_gauss_newton_nlls_8cpp-example.html#a4">GaussNewtonNlls.cpp</a>.</dd>
</dl>

</div>
</div>
<a id="ae7ced3680f1ae95af4bc2e6b98a5a517"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7ced3680f1ae95af4bc2e6b98a5a517">&#9670;&nbsp;</a></span>hat() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;dtype&gt; nc::linalg::hat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inVec</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>vector hat operator</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inVec</td><td>(3x1, or 1x3 cartesian vector) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>3x3 <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> </dd></dl>

</div>
</div>
<a id="ae9cdb091717a1c74dc659519d77e0048"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9cdb091717a1c74dc659519d77e0048">&#9670;&nbsp;</a></span>hat() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt; nc::linalg::hat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_vec3.html">Vec3</a> &amp;&#160;</td>
          <td class="paramname"><em>inVec</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>vector hat operator</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inVec</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>3x3 <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> </dd></dl>

</div>
</div>
<a id="a12e16cb9d1a7b09e85b4abbef14ba2ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12e16cb9d1a7b09e85b4abbef14ba2ef">&#9670;&nbsp;</a></span>hat() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;dtype&gt; nc::linalg::hat </td>
          <td>(</td>
          <td class="paramtype">dtype&#160;</td>
          <td class="paramname"><em>inX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">dtype&#160;</td>
          <td class="paramname"><em>inY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">dtype&#160;</td>
          <td class="paramname"><em>inZ</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>vector hat operator</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inX</td><td></td></tr>
    <tr><td class="paramname">inY</td><td></td></tr>
    <tr><td class="paramname">inZ</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>3x3 <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> </dd></dl>

</div>
</div>
<a id="ae36553eb100d8f2c2167e8ecadf2a9fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae36553eb100d8f2c2167e8ecadf2a9fc">&#9670;&nbsp;</a></span>inv()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt; nc::linalg::inv </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inArray</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>matrix inverse</p>
<p>SciPy Reference: <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.inv.html#scipy.linalg.inv">https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.inv.html#scipy.linalg.inv</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inArray</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_read_me_8cpp-example.html#a65">ReadMe.cpp</a>.</dd>
</dl>

</div>
</div>
<a id="a9c15421c77e6b4b12fca1515596d1414"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c15421c77e6b4b12fca1515596d1414">&#9670;&nbsp;</a></span>lstsq()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt; nc::linalg::lstsq </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>inTolerance</em> = <code>1e-12</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Solves the equation a x = b by computing a vector x that minimizes the Euclidean 2-norm || b - a x ||^2. The equation may be under-, well-, or over- determined (i.e., the number of linearly independent rows of a can be less than, equal to, or greater than its number of linearly independent columns). If a is square and of full rank, then x (but for round-off error) is the "exact" solution of the equation.</p>
<p>SciPy Reference: <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.lstsq.html#scipy.linalg.lstsq">https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.lstsq.html#scipy.linalg.lstsq</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inA</td><td>coefficient matrix </td></tr>
    <tr><td class="paramname">inB</td><td>Ordinate or "dependent variable" values </td></tr>
    <tr><td class="paramname">inTolerance</td><td>(default 1e-12)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_read_me_8cpp-example.html#a66">ReadMe.cpp</a>.</dd>
</dl>

</div>
</div>
<a id="a153a90dbcc2ca94c664c429868d15bc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a153a90dbcc2ca94c664c429868d15bc4">&#9670;&nbsp;</a></span>lu_decomposition()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::pair&lt;<a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt;, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt; &gt; nc::linalg::lu_decomposition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inMatrix</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>matrix LU decomposition A = LU</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inMatrix</td><td><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> to be decomposed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::pair&lt;NdArray, NdArray&gt; of the decomposed L and U matrices </dd></dl>

</div>
</div>
<a id="ad27c1996e4e27a6f8ba5d2aed0743bba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad27c1996e4e27a6f8ba5d2aed0743bba">&#9670;&nbsp;</a></span>matrix_power()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt; nc::linalg::matrix_power </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacenc.html#a8f5045ed0f0a08d87fd76d7a74ac128d">int16</a>&#160;</td>
          <td class="paramname"><em>inPower</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Raise a square matrix to the (integer) power n.</p>
<p>For positive integers n, the power is computed by repeated matrix squarings and matrix multiplications. If n == 0, the identity matrix of the same shape as M is returned. If n &lt; 0, the inverse is computed and then raised to the abs(n).</p>
<p>NumPy Reference: <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.matrix_power.html#numpy.linalg.matrix_power">https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.matrix_power.html#numpy.linalg.matrix_power</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inArray</td><td></td></tr>
    <tr><td class="paramname">inPower</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> </dd></dl>

</div>
</div>
<a id="a86ab79e41b748e7ea0ee4f2e0bc462a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86ab79e41b748e7ea0ee4f2e0bc462a6">&#9670;&nbsp;</a></span>multi_dot()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;dtype&gt; nc::linalg::multi_dot </td>
          <td>(</td>
          <td class="paramtype">const std::initializer_list&lt; <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>inList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compute the dot product of two or more arrays in a single function call.</p>
<p>NumPy Reference: <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.multi_dot.html#numpy.linalg.multi_dot">https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.multi_dot.html#numpy.linalg.multi_dot</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inList</td><td>list of arrays</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> </dd></dl>

</div>
</div>
<a id="a390c3d32ed4b8ed7e718cbe121025ebd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a390c3d32ed4b8ed7e718cbe121025ebd">&#9670;&nbsp;</a></span>pivotLU_decomposition()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt;, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt;, <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;double&gt; &gt; nc::linalg::pivotLU_decomposition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inMatrix</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>matrix pivot LU decomposition PA = LU</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inMatrix</td><td><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> to be decomposed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::tuple&lt;NdArray, NdArray, NdArray&gt; of the decomposed L, U, and P matrices </dd></dl>

</div>
</div>
<a id="acb38ad2613d50422afc539d005159055"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb38ad2613d50422afc539d005159055">&#9670;&nbsp;</a></span>svd()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void nc::linalg::svd </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &amp;&#160;</td>
          <td class="paramname"><em>outU</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &amp;&#160;</td>
          <td class="paramname"><em>outS</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; double &gt; &amp;&#160;</td>
          <td class="paramname"><em>outVt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>matrix svd</p>
<p>NumPy Reference: <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.svd.html#numpy.linalg.svd">https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.svd.html#numpy.linalg.svd</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inArray</td><td><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> to be SVDed </td></tr>
    <tr><td class="paramname">outU</td><td><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> output U </td></tr>
    <tr><td class="paramname">outS</td><td><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> output S </td></tr>
    <tr><td class="paramname">outVt</td><td><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> output V transpose </td></tr>
  </table>
  </dd>
</dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_read_me_8cpp-example.html#a67">ReadMe.cpp</a>.</dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacenc.html">nc</a></li><li class="navelem"><a class="el" href="namespacenc_1_1linalg.html">linalg</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
